<?php 
/*
	My College Link - Login add on to display in header of page
	Dan Newman
	8/24/2011
	
	redirects to logout.php or verifyLogin.php
	uses logout.php
	uses absolute path referencing, DO NOT USE RELATIVE PATHS!
	
*/

	session_start();
    $userID = isset($_SESSION['userID']) ? $_SESSION['userID']:null;
    if($userID){
?>
        <div id="loggedIn">
            Welcome Back, <?php echo $userID;?>!  <a href="/ts/MyCollegeLink/Login/logout.php">logout</a>
        </div>
<?php
    }
	else{
?>
        <script language="javascript" type="text/javascript" src="/ts/MyCollegeLink/Login/loginJS.js"></script>
        
        <div id="headerLogin">
            <div id="notLoggedIn" display="float">
                <form name="loginForm" method="post" action="/ts/MyCollegeLink/Login/verifylogin.php">
                    <div id="userHL">
                    	<input name="redirect" type="hidden" id="redirect" value="<?php echo $_SERVER['PHP_SELF'];?>" />
                        <input name="username" type="text" id="username"  value="username"
                            onMouseOver='mouseIn(this);' onMouseOut='mouseOut(this);' onBlur='blurred(this)'>
                        <input name="pass" type="password" id="password" value="password"
                            onMouseOver='mouseIn(this);' onMouseOut='mouseOut(this);' onBlur='blurred(this);'>
                        <input type="image" src="/ts/MyCollegeLink/Login/img/loginBtn.jpg" id="loginButton"></div>
                </form>
            </div>    
        </div>
<?php
	}
?>